package defaultSysConfig

import (
	"saas_sys_base/common"
	. "saas_sys_base/modules/appmanager/models"
	. "saas_sys_base/modules/appmanager/service"
)

const APPSUIT_ID_10 = 10

var appSuitConfig_Suit_10 AppSuit = AppSuit{
	Id: APPSUIT_ID_10,
	AppSuitCode: APPSUIT_ID_10,
	AppSuitName: "千麦客小微店APP套餐",
	Description: "",
	SortIdx: 0,
	Applist: []AppSuitItem{
		{
			//AppSuitId: APPSUIT_ID_10,
			MiniAppId: common.APP_ID_MAIN_WEAPP,
			CheckMode: common.APP_PERMISSION_CHECK_MODE_ALWAYS_VALID,
		},
		{
			//AppSuitId: APPSUIT_ID_10,
			MiniAppId: common.APP_ID_TENANT_WEAPP,
			CheckMode: common.APP_PERMISSION_CHECK_MODE_DATETIME2,
		},
	},
}

func ConfigAppSuit() error {
	var appSuitService AppSuitService
	err := appSuitService.AddAppSuit(&appSuitConfig_Suit_10)
	if err != nil {
		panic(err)
	}

	return nil
}